package com.wc.alorithm_luogu.P1307;

import java.util.Scanner;

/**
 * @Author congge
 * @Date 2023/4/20 12:12
 * @description https://www.luogu.com.cn/problem/P1307
 * 数字反转
 */
public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);

        long N = sc.nextInt();

        boolean sign = N < 0;

        if (sign) {
            N = -N;
        }
        long reverseN = 0;

        while (N!=0){
            reverseN = reverseN*10 + N%10;
            N/=10;
        }
        if (sign){
            reverseN = -reverseN;
        }
        System.out.println(reverseN);
    }
}
